#include "StdAfx.h"
#include "MiiFilter.h"
#include "miiPin.h"
#include "audpinIn.h"

CMiiFilter::CMiiFilter(LPUNKNOWN pUnk, HRESULT *phr) : CBaseFilter(NAME("CMiiShow"), pUnk, &m_tLock, GUID_NULL)
{
	m_pin = new CMiiShowPinIn(this, &m_tLock, phr);
	m_audpin = new CMiiAudPinIn(this, &m_tLock, phr);
	m_pin->AddRef();
	m_audpin->AddRef();
}

CMiiFilter::~CMiiFilter(void)
{
	m_pin->Release();
	m_audpin->Release();
}

int CMiiFilter::GetPinCount(void)
{
	return 2;
}

CBasePin *CMiiFilter::GetPin(int n)
{
	if(n==0)
		return m_pin;
	return m_audpin;
}
